#include <iostream>
using namespace std;

class Base {
public:
    Base(int x) : x_(x) {} 
    friend Base operator+(const Base& x1, const Base& x2);
    friend bool operator==(const Base & lhs,const int & x);
private:
    int x_;
};

/* int operator+(const Base& x1, const Base& x2) { */
/*     return x2.x_ - x1.x_; */
/* } */

Base operator+(const Base& x1, const Base& x2) {
    return Base(x2.x_ - x1.x_);
}

bool operator==(const Base & lhs,const int & x){
    return lhs.x_ == x;
}
void test0() {
    int i = 2;
    int j = 7;

    Base x(i); // 2
    Base y(j); // 7

    cout << (x + y == j - i) << endl;
}

int main(void)
{
    test0();
    return 0;
}
